<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href="index.html">作业一</a>
<a href="index00.html">作业二</a>
<a href="index01.html">作业三</a>
<a href="index02.html">作业四</a>
<a href="index03.html">作业五</a>
<script>
    function attr(a){
        var sum =0;
        for(var i=0;i<a.length;i++){
            sum +=a[i];
        }
        return sum;
    }
    var temp  = [12,34,2,5,76];
    var count = attr(temp);
    document.write('各个元素的和：'+count);

</script>
</body>
</html>